Discover gists
# ----------------------------------------------------------------------------- | |
# From https://en.wikipedia.org/wiki/Minkowski–Bouligand_dimension: | |
# | |
# In fractal geometry, the Minkowski–Bouligand dimension, also known as | |
# Minkowski dimension or box-counting dimension, is a way of determining the | |
# fractal dimension of a set S in a Euclidean space Rn, or more generally in a | |
# metric space (X, d). | |
# ----------------------------------------------------------------------------- | |
import scipy.misc | |
import numpy as np |
ovs-vsctl add-port <bridge name> <port name> | |
ovs-vsctl set interface <port name> type=patch | |
ovs-vsctl set interface <port name> options:peer=<peer name> |
تنظیمات فونت در لینوکس بر عهده برنامه fontconfig میباشد. این برنامه فونتهای سیستم را بر اساس الویت بندیهایی که قابل تنظیم میباشد مرتب میکند و در اختیار سایر برنامه ها قرار می دهد. مشکل اصلی که اکثر کاربران فارسی زبان لینوکس در ارتباط با fontconfig دارند عدم نمایش صحیح حروف فارسی می باشد که معمولا به دو دلیل زیر اتفاق میافتد:
- نصب نبودن فونت مناسب بر روی سیستم که حروف فارسی را ساپورت کند
- عدم وجود فایل تنظیمات fontconfig برای انتخاب فونت مناسب برای نمایش حروف فارسی
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
I've recently read about and discussed CSS Scroll Snapping so often that I felt like I should build a CSS-only carousel based on it.
Here are a few things to note:
Accessibility is in line with all other CSS-only experiments: it can only be considered mediocre in term of semantics and visual indicators. Don't do this in production.
The going forward and back is done via a combination of CSS Scroll Snap together with scroll-behavior: smooth
and moving the focus through the slides via anchor links.
/* Android ssl certificate pinning bypass script for various methods | |
by Maurizio Siddu | |
Run with: | |
frida -U -f <APP_ID> -l frida_multiple_unpinning.js [--no-pause] | |
*/ | |
setTimeout(function() { | |
Java.perform(function() { | |
console.log(''); |
Substack https://aljamal.substack.com/p/homoiconic-python
atom=lambda x:not isinstance(x,list)
eq=lambda x,y:x == y
car=lambda x:x[0]
cdr=lambda x:x[1:]
#!/bin/sh | |
# Strip color codes from Rails logs | |
# Examples: | |
# stripcolor test.log > test.log.nocolor # Save a copy of the log without color | |
# stripcolor test.log | gist # Gist the log | |
# stripcolor test.log | pbcopy # Copy the log to the clipboard in OSX | |
# stripcolor test.log | xclip -selection clipboard # Copy log to clipboard in Linux | |
cat "$@" | sed -r "s/\x1B\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" |